// wglgl.hpp
//

#ifndef _WGL_GL_HPP
#define _WGL_GL_HPP

// [FIXME] should be removed (needed for WGL_API)
#include "wgl/wglbase.hpp"

#include "wgl/wgl_gltypes.hpp"
#include "wgl/wgl_glenums.hpp"
#include "wgl/wgl_glfuncs.hpp"



// defined in wglapplayer.cpp
extern wgl::AppLayerVTable & WGL_API gl;



namespace wgl
{
  // gl_error_name
  //
  inline const char *gl_error_name ( GLenum err )
  {
    switch (err)
      {
      case GL_NO_ERROR: return "no error";
      case GL_INVALID_ENUM: return "invalid enum";
      case GL_INVALID_VALUE: return "invalid value";
      case GL_INVALID_OPERATION: return "invalid operation";
      case GL_STACK_OVERFLOW: return "stack overflow";
      case GL_STACK_UNDERFLOW: return "stack underflow";
      case GL_TABLE_TOO_LARGE: return "table too large";
      default: return "unknown";
      }
  }
}



#endif
